﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="recepi01.aspx.cs" Inherits="ASPNETandJQUERY.chapter01.recepi01" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link rel="stylesheet" type="text/css" href="Style/style.css" />
    <script type="text/javascript" language="javascript" src="scripts/jquery-1.7.1.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            var searchBox = $('#<%=TextBox1.ClientID%>');
            searchBox.focus(function () {
                if (searchBox.val() == this.title) {
                    searchBox.removeClass("defaultText");
                    searchBox.val("");
                }
            });

            searchBox.blur(function () {
                if (searchBox.val() == "") {
                    searchBox.addClass("defaultText");
                    searchBox.val(this.title);
                }
            });

            searchBox.blur();
        });
    
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div align="center">
        <fieldset style="width: 400px; height: 80px;">
            <p>
                <asp:TextBox ID="TextBox1" Width="200px" CssClass="defaultText" ToolTip="Enter you search keyword here"
                    runat="server"></asp:TextBox>
                <asp:Button ID="btnSubmit" runat="server" Text="SEARCH" />
            </p>
        </fieldset>
    </div>
    </form>
</body>
</html>
